package com.example.service.impl;


import java.util.ArrayList;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.example.entity.Book;
import com.example.mapper.BookMapper;
import com.example.service.BookService;
@Service
@Transactional
public class BookServiceImlp implements BookService {
	@Autowired
	private BookMapper bookMapper;
	
	private Book book;

	private List list;
	
	public int add(Book book) {
		
		return bookMapper.addBook(book);
	}


	public List<Book> query() {
		list = new ArrayList<Book>();
		list = bookMapper.query();
		return list;
	}


	public int delete(Integer id) {
		return bookMapper.delete(id);
	}


	public int update(Book book) {
		return bookMapper.update(book);
	}



	

}
